home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19941031-19941221
/
000462_news@columbia.edu_Wed Dec 14 08:34:31 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1995-07-31
|
3KB
Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA03511
(5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Sat, 17 Dec 1994 08:21:56 -0500
Received: by apakabar.cc.columbia.edu id AA08941
(5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Sat, 17 Dec 1994 08:21:54 -0500
Path: news.columbia.edu!spcuna!solaris.cc.vt.edu!news.mathworks.com!udel!gatech!howland.reston.ans.net!news.cac.psu.edu!psuvm!hdk
Organization: Penn State University
Date: Wed, 14 Dec 1994 13:34:31 EST
From: H. D. Knoble <HDK@psuvm.psu.edu>
Message-Id: <94348.133431HDK@psuvm.psu.edu>
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Stripping ANSI escape sequence from log, how?
References: <3cnbak$8lc@pauling.wadsworth.org>
Lines: 54
Apparently-To: kermit.misc@watsun.cc.columbia.edu
In article <3cnbak$8lc@pauling.wadsworth.org>, frank@news.wadsworth.org
(Franklin Hsia) says:
>Working with MS-KERMIT and logging a VT220 session to a file.
>Problem: The file contains ANSI escape sequences which are extraneous for
>my purposes. I would like to only deal with the text portion.
>Is there a utility out there that can strip away the ANSI stuff? Or is there
>a setting in KERMIT I can set to?
Try using DOS and MS-Kermit as shown in the following .BAT file to
to convert the DOS capture file capfile.vt to capfile.txt:
@Echo off
REM Filename: FIXVT.BAT
REM Purpose: DOS Batch code to remove escape sequences from VTxxx capture
REM files using MS-Kermit as the working tool.
REM By: Skip Knoble, Penn State Center for Academic Computing
REM Input file: capfile.vt
REM Output file: capfile.txt
REM Platform: any PC and DOS that will run MS-Kermit 3.13 or 3.14
REM -------------------------------------------------------------------------
REM The character string, Esc OpenBracket ? 5 i when prepended to
REM the VTxxx capture file is the code to "turn on" the PC Printer.
REM Usage Note:
REM You must replace the phrase "ESC OpenBracket " in the next echo
REM statement with two contiguous characters: ASCII 27 ASCII 91
REM before running this .BAT REM file on your PC. This is only to
REM allow this DOS algorithm to appear as NON-DOS printable prose.
REM (With DOS 5.x 6.x "ESC" can be entered via DOS EDIT by pressing:
REM Ctrl-P,Ctrl-OpenBracket. Before DOS 5.0 occurrences of "echo." can be
REM replaced by "echo LineFeed" where LineFeed is the ASCII 10 character.)
echo ESC OpenBracket ?5i > temp.txt
copy temp.txt /b + capfile.vt /b > nul
REM Append some linefeeds to the end to set up a message to end user.
echo. >> temp.txt
Echo ------- Text from CAPFILE.VT appears above this line ------- >> temp.txt
FOR %%v IN (1 2 3 4 5 6 7 8 9 * 1 2 3 4 5 ) DO echo. >> temp.txt
REM Append that message and LF's to roll rest of replayed session off screen.
echo Please press Alt-X now to return to DOS >> temp.txt
FOR %%v IN (1 2 3 4 5) DO echo. >> temp.txt
REM Invoke Kermit to convert the file temp.txt to capfile.txt
REM Setting port BIOSn will allow MS-Kermit to do its thing, even while
REM something else (e.g., SLIP driver)may be using COMn, without disturbing
REM this COM port session.
kermit -f nul, set port bios1, set print capfile.txt, replay temp.txt
erase temp.txt
if exist capfile.txt Echo Output file is capfile.txt.
REM ---End FIXVT.BAT ---